package com.wm.task1.client.view;

import com.wm.task1.client.LinkServer;

import java.util.Scanner;

public class ViewMain {
    private LinkServer linkServer = new LinkServer();
    private Scanner sc = new Scanner(System.in);
    public void computer(){

        System.out.println("请输入加法表达式:");
        String equation = sc.nextLine();
        Integer result = linkServer.linkServer(equation);
        if(result == null){

            System.out.println("加法表达式有误");
        }else{
            System.out.println("结果:"+ result);
        }
    }

}
